<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <!-- include summernote css/js -->


    <!--common-->
    <link href="css/style.css" th:href="@{/css/style.css}" rel="stylesheet">
    <link href="css/style-responsive.css" th:href="@{/css/style-responsive.css}" rel="stylesheet">

    <link href="https://unpkg.com/@wangeditor/editor@latest/dist/css/style.css" rel="stylesheet">
    <style>
        #editor—wrapper {
            border: 1px solid #ccc;
            z-index: 100; /* 按需定义 */
        }

        #toolbar-container {
            border-bottom: 1px solid #ccc;
        }

        #editor-container {
            height: 500px;
        }


        .inputBox {
            position: relative;
            width: 500px;
        }

        .inputBox input {
            width: 100%;
            padding: 10px 0 5px;
            background: transparent;
            outline: none;
            box-shadow: none;
            border: none;
            color: #fff;
            font-size: 2em;
            letter-spacing: 0.1em;
            transition: 0.5s;
        }

        .inputBox span {
            position: absolute;
            left: 0;
            padding: 10px 0 5px;
            pointer-events: none;
            font-size: 2em;
            color: rgba(255, 255, 255, 0.5);
            text-transform: uppercase;
            /* 定义无小写字母，仅有大写字母 */
            letter-spacing: 0.1em;
            /* 是增加（值为正）或减少（值为负）字符间距 */
            transition: 0.5s;
        }

        .inputBox input:valid ~ span,
            /* 表单元素的值需要根据指定条件验证时设置指定样式 */

        .inputBox input:focus ~ span

            /* 选择具有焦点的时候 */
        {
            color: #b0a4e3;
            transform: translateY(-16px);
            /* 将文字向Y轴（向上）平移16px */
            font-size: 0.65em;
        }

        .inputBox i

            /* 可见的一个线 */
        {
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 2px;
            background: #fff;
            overflow: hidden;
        }

        .inputBox i::before

            /* 在i标签的左边创建（伪元素）一个跟i等大的一条线，加上炫彩颜色 */
        {
            content: '';
            position: absolute;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, #EEBD89, #D13ABD, #C973FF, #6CC6CB, #9FA5D5, #EAD6EE);
            animation: runing 1s linear infinite;
            transition: 0.5s;
        }

        .inputBox input:valid ~ i::before,
        .inputBox input:focus ~ i::before {
            left: 0;
        }

        /* 创建动画 */
        @keyframes runing {
            0% {
                background-position-x: 0;
            }

            100% {
                background-position-x: 250px;
            }
        }

        /*    打卡start*/
        .c1 {
            /* 弹性布局 */
            display: flex;
            /* 水平排列 */
            flex-direction: row;
            /* 允许换行 */
            flex-wrap: wrap;
            justify-content: space-around;
            width: 500px;
            margin-left: 350px;
        }

        .c1 .c2 {
            /* 相对定位 */
            position: relative;
            width: 400px;
            height: 60px;
            background: none;
            /* 设置边框 */
            border: 4px solid;
            border-radius: 20px;
            /* 自定义边框颜色 */
            color: var(--c);
            /* 鼠标移入时，光标变成小手 */
            cursor: pointer;
            font-size: 16px;
            font-weight: bold;
            margin: 20px;
        }

        /* 分别设置四个框的颜色 */
        .c1 .c2:nth-child(1) {
            --c: #F2F2F2;
        }

        .c1 .c2:nth-child(2) {
            --c: #93edd4;
        }

        .c1 .c2:nth-child(3) {
            --c: #f9cb8f;
        }

        .c1 .c2:nth-child(4) {
            --c: #ffb1a3;
        }

        /* 设置上下缺口 */
        .c1 .c2::before, .c1 .c2::after {
            content: "";
            /* 绝对定位 */
            position: absolute;
            width: 14px;
            height: 4px;
            /* 缺口颜色与背景颜色一致 */
            background-color: #000000;
            /* 沿X轴倾斜30° */
            transform: skewX(30deg);
            /* 设置动画效果 */
            transition: 0.5s linear;
        }

        /* 设置上下缺口位置 */
        .c1 .c2::before {
            top: -4px;
            left: 50%;
        }

        .c1 .c2::after {
            bottom: -4px;
            right: 20%;
        }

        /* 光标移入时，缺口位置变换 */
        .c1 .c2:hover::before {
            left: 80%;
        }

        .c1 .c2:hover::after {
            right: 80%;
        }


    </style>
    <!--    <link href="css/boketiao.css" th:href="@{/css/boketiao.css}" rel="stylesheet">-->
    <!--    <link href="css/boketiao_1.css" th:href="@{/css/boketiao_1.css}" rel="stylesheet">-->

    <title>不准偷懒</title>

    <!--    <div th:include="common :: commonHeader"></div>-->

</head>

<body class="sticky-header">

<section>
    <!--    <div th:replace="common::#leftmenu"></div>-->

    <!-- main content start-->
    <!--    <div class="main-content">-->

    <!--        <div th:replace="common::headermenu"></div>-->

    <!-- page heading start-->


    <div class="page-heading">

        <h3 style="color: wheat">
            监督园园学习
        </h3>
        <div class="c1">
            <button type="button" class="c2" id="punchCard"
                    data-container="body" data-toggle="popover" data-placement="top" onclick="punchCard()"
                    data-content="打卡成功" style="margin-left: 170px">
                打卡
            </button>

        </div>
        <div style="color: lightgoldenrodyellow;size: 24px;float: right;padding-right: 40px;">
            欢迎您，杨园园
            <span style="color: lightgoldenrodyellow;size: 24px" th:text="${name}">

        </span>
        </div>

        <!--            <ul class="breadcrumb">-->
        <!--                <li>-->
        <!--                    <a href="#">Dashboard</a>-->
        <!--                </li>-->
        <!--                <li>-->
        <!--                    <a href="#">Data Tables</a>-->
        <!--                </li>-->
        <!--                <li class="active"> Dynamic Table</li>-->
        <!--            </ul>-->
        <div style="float: right">
            <!--            <button  class="btn btn-success" id="emp_add_modal_btn" style="margin: 1rem;height: 4rem;width: 100px">打卡</button>-->

            <!--            <div class="c1">-->
            <!--                <button class="c2" id="punchCard">点赞</button>-->
            <!--            </div>-->


        </div>
    </div>


    <!-- page heading end-->

    <div>

        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" ><a href="#profile" aria-controls="profile" role="tab"
                                                      data-toggle="tab" onclick="getNoteInfo()"
                                                      id="getNoteInfo">Learn</a>
            </li>
            <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab"
                                       onclick="getPunchInfo()" id="getPunchInfo">Card</a>
            </li>

            <li role="presentation"><a onclick="tozhuanpan()" href="#messages" aria-controls="messages" role="tab" data-toggle="tab">幸运抽奖</a>
            </li>
            <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">开发中</a>
            </li>
            <button onclick="toCreateNoteHtml()" class="btn btn-success" id="emp_add_modal_btn2"
                    style="margin: 1rem;height: 3rem;width:15rem;margin-bottom: 1px;float: right">记笔记
            </button>
            <button onclick="toWallet()" class="btn btn-success" id="emp_add_modal_btn3"
                    style="margin: 1rem;height: 3rem;margin-bottom: 1px;float: right">钱包
            </button>
        </ul>

        <!-- Tab panes -->
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane" id="profile">

                <!--                <div class="inputBox" style="margin: 15px">-->

                <!--                    <input type="text" required="required" id="bigTitleInfo">-->
                <!--                    <span id="noteTitle">输入笔记标题</span>-->
                <!--                    <i></i>-->
                <!--                </div>-->

                <!--&lt;!&ndash;抽取start&ndash;&gt;-->
                <!--                <div id="editor—wrapper">-->
                <!--                    <div id="toolbar-container">&lt;!&ndash; 工具栏 &ndash;&gt;</div>-->
                <!--                    <div id="editor-container">&lt;!&ndash; 编辑器 &ndash;&gt;</div>-->
                <!--                    <button class="btn btn-success" id="emp_add_modal_btn3" style="margin: 1rem;height: 4rem">一键提交-->
                <!--                    </button>-->
                <!--                </div>-->
                <!--&lt;!&ndash;抽取end&ndash;&gt;-->
                <div style="color: #F3F4F6">
                    <!--                学习信息start-->
                    <!--                    <article class="q1" style="margin: 10px">-->
                    <!--                        <section class="qq1">-->
                    <!--                            <div class="f1">-->
                    <!--                                <a href="https://www.cnblogs.com/oenn/" class="ff1"><span>一</span></a>-->
                    <!--                                <span class="fff1"><span style="font-size: 5rem">2023-02-28 23:31</span></span>-->
                    <!--                            </div>-->

                    <!--                            <div class="qqq1" style="margin: 5px">-->
                    <!--                                <a class="qqqq1" style="font-size: 2rem" href="https://www.cnblogs.com/oenn/p/17166238.html"-->
                    <!--                                   target="_blank">helm在k8s上部署Elasticsearch和Kibana</a>-->
                    <!--                                <p class="qqqqq1">-->
                    <!--                                    <a href="https://www.cnblogs.com/oenn/">-->
                    <!--                                        <img src="https://pic.cnblogs.com/face/2506473/20210816225211.png"-->
                    <!--                                             class="qqqqqq1"-->
                    <!--                                             alt="博主头像">-->
                    <!--                                    </a>-->
                    <!--                                    前提 在win上安装docker desktop，没有网络限制，而且，打开kubernetes之后，很快就安装启动好了。-->
                    <!--                                    在win上安装scoop，有网络限制，需要访问github raw的文件内容，安装方法 官网 有安装命令 &gt; Set-ExecutionPolicy-->
                    <!--                                    RemoteSigned - ...-->
                    <!--                                </p>-->
                    <!--                            </div>-->
                    <!--                        </section>-->
                    <!--                        <figure>-->
                    <!--                        </figure>-->
                    <!--                    </article>-->
                    <div class="row mt-5" style="margin: 20px">
                        <div class="card" style="margin: 10px" th:each="noteInfo,stats:${noteInfos}">
                            <!--                            <h5 class="card-title" th:text="${stats.count}" >这是卡片的标题</h5>-->
                            <h5 class="card-title" th:text="${noteInfo.bigTitleInfo}" style="font-size: 3rem">
                                这是卡片的标题</h5>

                            <!-- 图片在上边 -->
                            <!--                            <img class="card-img-top" src="https://img.douyucdn.cn/data/yuba/default/2023/02/28/20230228170249828391963771.1440x0.jpg.webp?i=41080de3af37459632e2871ced53624004" alt="" style="width: 200px;height: 300px">-->
                            <div class="card-body">
                                <p class="card-text" th:utext="${noteInfo.noteHtml}">
                                    这是卡片的文本内容，需要添加一个card-text的class。这是卡片的文本内容，需要添加一个card-text的class。这是卡片的文本内容，需要添加一个card-text的class。这是卡片的文本内容，需要添加一个card-text的class。这是卡片的文本内容，需要添加一个card-text的class
                                </p>
                                <p class="card-text"><small class="text-muted" th:text="${noteInfo.noteCommitTime}">2
                                    days ago</small></p>
                            </div>
                            <hr>
                        </div>

                    </div>
                    <!--                学习信息end-->
                </div>


            </div>

            <div role="tabpanel" class="tab-pane active" id="home">
                <!--body wrapper start-->
                <div class="wrapper">
                    <div class="row">
                        <div class="col-sm-12">

                            <!--查询表单-->
                            <!--                            <form method="post" th:action="@{/queryWithConditionalByPunch}">-->
                            <!--                                &lt;!&ndash;                <form method="post" th:action="@{/getPunchInfo}">&ndash;&gt;-->
                            <!--                                <div style="display: flex">-->
                            <!--                                    <div class="form-group" style="width: 40rem; margin: 1rem">-->
                            <!--                                        <label for="finishStatus1" style="color: yellow">完成状态</label>-->
                            <!--                                        <input type="text" class="form-control" id="finishStatus1" name="finishStatus">-->
                            <!--                                        <small id="emailHelp" class="form-text text-muted" style="color: wheat">不输入默认查询全部</small>-->
                            <!--                                    </div>-->
                            <!--                                    <div class="form-group col-sm" style="width: 40rem;margin: 1rem">-->
                            <!--                                        <label for="punchTime1" style="color: yellow">日期</label>-->
                            <!--                                        <input type="text" class="form-control" id="punchTime1" name="punchTime">-->
                            <!--                                        <small id="emailHelp1" class="form-text text-muted" style="color: red">您必须固定格式。如2021-5-21 &nbsp</small>-->
                            <!--                                        <small id="emailHelp2" class="form-text text-muted" style="color: wheat">不输入默认查询全部</small>-->
                            <!--                                    </div>-->
                            <!--                                    <button type="submit" class="btn btn-success" style="margin: auto 0;height: 5rem">查询</button>-->
                            <!--                                </div>-->
                            <!--                            </form>-->
                            <!---->
                            <!--                            <button class="btn btn-success" id="emp_add_modal_btn" style="margin: 1rem;height: 4rem">添加航班</button>-->

                            <div class="row">
                                <!--    共12列，占四列，向右偏移四列 *4* 4 *4*-->
                                <div class="col-md-4 col-md-offset-8">

                                </div>


                            </div>
                            <section class="panel">
                                <header class="panel-heading">
                                    打卡信息<button type="button" onclick="flushPunch()" id="flushPunch" class="btn btn-warning"style="margin-left: 8px">刷新</button>
                                    <span class="tools pull-right">

                <a href="javascript:;" class="fa fa-chevron-down"></a>
                <a href="javascript:;" class="fa fa-times"></a>

             </span>
                                </header>
                                <div class="panel-body">
                                    <div class="adv-table">
                                        <table class="display table table-bordered table-striped" id="dynamic-table">
                                            <thead>
                                            <tr>
                                                <th>#</th>
                                                <th>打卡时间</th>
                                                <th>结束时间</th>
                                                <th>基础奖赏金额</th>
                                                <th>基础惩罚金额</th>
                                                <th>额外奖励</th>
                                                <th>额外惩罚</th>
                                                <th>是否双倍奖励</th>
<!--                                                <th>支付宝账号</th>-->
                                                <th>完成</th>
                                                <th>评价等级</th>
                                                <th>当日所获</th>
                                                <th>钱包余额</th>
                                                <th>操作</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <tr class="gradeA" th:each="flight,stats:${punches}">
                                                <td th:text="${stats.count}">123</td>
                                                <td th:text="${flight.punchTime}">打卡时间</td>
                                                <td th:text="${flight.punchUpdateTime}">结束时间</td>
                                                <td th:text="${flight.baseAwardRMB}">基础奖赏金额</td>
                                                <td th:text="${flight.basePunishRMB}">基础惩罚金额</td>
                                                <td th:text="${flight.extraAward}">额外奖励</td>
                                                <td th:text="${flight.extraPunish}">额外惩罚</td>
                                                <td th:text="${flight.isDoubleAward}">是否双倍奖励</td>
<!--                                                <td th:text="${flight.zfb}">支付宝账号</td>-->
                                                <td th:text="${flight.finishStatus}">完成</td>
                                                <td th:text="${flight.judge}">评价等级</td>
                                                <td th:text="${flight.currentDayMoney}">当日所获</td>
                                                <td th:text="${flight.totalMoney}">钱包余额</td>
                                                <td>
                                                    <!--                                        <a th:href="@{/deleteFlight/{fno}(fno=${flight.fno})}" class="btn btn-danger btn-sm" type="button">删除</a>-->
                                                    <!--                                        <a th:href="@{/deleteFlight/{fno}(fno=${flight.fno})}" class="btn btn-danger btn-sm" type="button">删除</a>-->
                                                    <a class="btn btn-danger btn-sm" type="button">投诉</a>
                                                    <a class="btn btn-default btn-sm" type="button">待开发</a>
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </section>
                        </div>
                    </div>
                    <!--        </div>-->
                    <!--body wrapper end-->

                    <!--footer section start-->
                    <footer>
                        2023 &copy; 李威彤&杨园园 </a>
                    </footer>
                    <!--footer section end-->


                </div>
                <!-- main content end-->
            </div>

            <div role="tabpanel" class="tab-pane" id="messages">
                开发中...
            </div>
            <div role="tabpanel" class="tab-pane" id="settings">
                开发中...
            </div>
        </div>

    </div>

</section>


<!-- 员工添加Modal -->
<div class="modal fade" id="empAddModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">新增航班</h4>
            </div>
            <div class="modal-body">
                <!--                                员工表单-->
                <form id="add_form" class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">航班号</label>
                        <div class="col-sm-10">
                            <input name="fno" type="text" class="form-control" id="fno"
                                   placeholder="fno">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">起点</label>
                        <div class="col-sm-10">
                            <input name="fstart" type="email" class="form-control" id="fstart"
                                   placeholder="fstart">
                        </div>
                    </div>
                    <!--                    <div class="form-group">-->
                    <!--                        <label class="col-sm-2 control-label">终点</label>-->
                    <!--                        <div class="col-sm-10">-->
                    <!--                            <label class="radio-inline">-->
                    <!--                                <input type="radio" name="gender" id="gender1_add_input" value="M" checked="checked"> 男-->
                    <!--                            </label>-->
                    <!--                            <label class="radio-inline">-->
                    <!--                                <input type="radio" name="gender" id="gender0_add_input" value="F"> 女-->
                    <!--                            </label>-->
                    <!--                        </div>-->
                    <!--                    </div>-->
                    <div class="form-group">
                        <label class="col-sm-2 control-label">终点</label>
                        <div class="col-sm-10">
                            <input name="fend" type="text" class="form-control" id="fend"
                                   placeholder="fend">
                        </div>
                    </div>
                    <!--                    <div class="form-group">-->
                    <!--                        <label class="col-sm-2 control-label">日期</label>-->
                    <!--                        <div class="col-sm-4">-->
                    <!--                            &lt;!&ndash;                                            部门提交部门id即可&ndash;&gt;-->
                    <!--                            <select name="dId" class="form-control" id="dept_add_select">-->

                    <!--                            </select>-->
                    <!--                        </div>-->
                    <!--                    </div>-->
                    <div class="form-group">
                        <label class="col-sm-2 control-label">日期</label>
                        <div class="col-sm-10">
                            <input name="fdate" type="date" class="form-control" id="fdate"
                                   placeholder="fdate">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">起飞时刻</label>
                        <div class="col-sm-10">
                            <input name="ftakeOff" type="text" class="form-control" id="ftakeOff"
                                   placeholder="ftakeOff">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">到达时刻</label>
                        <div class="col-sm-10">
                            <input name="farrive" type="text" class="form-control" id="farrive"
                                   placeholder="farrive">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">剩余座位数</label>
                        <div class="col-sm-10">
                            <input name="fseat" type="text" class="form-control" id="fseat"
                                   placeholder="fseat">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">票价</label>
                        <div class="col-sm-10">
                            <input name="fprice" type="text" class="form-control" id="fprice"
                                   placeholder="fprice">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">折扣票数</label>
                        <div class="col-sm-10">
                            <input name="fdiscountVote" type="text" class="form-control" id="fdiscountVote"
                                   placeholder="fdiscountVote">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">折扣率</label>
                        <div class="col-sm-10">
                            <input name="fdiscountRate" type="text" class="form-control" id="fdiscountRate"
                                   placeholder="fdiscountRate">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">航班所属航空公司</label>
                        <div class="col-sm-10">
                            <input name="fcompany" type="text" class="form-control" id="fcompany"
                                   placeholder="fcompany">
                        </div>
                    </div>

                    <!--                    <div class="form-group">-->
                    <!--                        <div id="successAndError" class="col-sm-4">-->
                    <!--                            <span id="jsrSpan">?</span>-->
                    <!--                        </div>-->
                    <!--                    </div>-->
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button id="emp_save_btn" type="button" class="btn btn-primary">保存</button>
            </div>
        </div>
    </div>
</div>
<!--<div th:replace="common::commonScript"></div>-->
<!--dynamic table-->
<script type="text/javascript" language="javascript" src="js/advanced-datatable/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/data-tables/DT_bootstrap.js"></script>
<!--dynamic table initialization -->
<script src="js/dynamic_table_init.js"></script>
<!-- Placed js at the end of the document so the pages load faster -->
<script th:src="@{/js/jquery-1.10.2.min.js}"></script>
<script th:src="@{/js/jquery-ui-1.9.2.custom.min.js}"></script>
<script th:src="@{/js/jquery-migrate-1.2.1.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/modernizr.min.js}"></script>
<script th:src="@{/js/jquery.nicescroll.js}"></script>
<!--common scripts for all pages-->
<script th:src="@{/js/scripts.js}"></script>

<script>
    /**
     * 新增员工按钮点击事件
     */
    $("#emp_add_modal_btn").click(function () {
        // 发送ajax请求，查询部门信息，以便显示在下拉列表中
        // getDept("#dept_add_select");
        // 弹出模态框
        $("#empAddModal").modal({
            backdrop: 'static'
        });
    });

    /**
     * 点击保存，保存员工方法
     */
    $("#emp_save_btn").click(function () {
        // 提交表单数据给服务器，前端数据校验
        // if (!validate_add_form()) {
        //     return false;
        // }
        // 发送ajax请求保存员工
        $.ajax({
            url: "/addFlight",
            type: "POST",
            // 请求数据 是表单每一项具体输入信息，使用serialize
            data: $("#add_form").serialize(),
            success: function (data) {
                // if (data.code == 100){
                // 关闭模态框
                $("#empAddModal").modal('hide');
                // $("#jsrSpan").text(""); // 修复再次弹出模态框仍有上次错误提示信息bug
                // 发送ajax前往最有一页查询插入的内容,总记录数肯定比总页码大
                window.location.reload(); // 重新刷新当前页面。新增的保存后，重要。

                // to_page(totalResult);


                // }else {
                //     // 否则显示失败信息
                //     console.log(data);//{code: 200, msg: "处理失败", map: {…}}
                //     if (undefined != data.map.errorFields.email){
                //         // 显示邮箱的错误信息
                //         show_validate_msg("#successAndError","error",data.map.errorFields.email);
                //     }
                //     if (undefined != data.map.errorFields.empName){
                //         // 显示名字的错误信息
                //         show_validate_msg("#successAndError","error",data.map.errorFields.empName);
                //     }
                // }

            }
        });
    });
    //    标题输入样式

</script>

<!--富文本编辑器-->
<script src="https://unpkg.com/@wangeditor/editor@latest/dist/index.js"></script>
<!--富文本编辑器AJAX-->
<script>
    const {createEditor, createToolbar} = window.wangEditor

    const editorConfig = {
        placeholder: 'Type here...',
        onChange(editor) {
            const html = editor.getHtml()
            console.log('editor content', html)
            // 也可以同步到 <textarea>
        }
    }

    const editor = createEditor({
        selector: '#editor-container',
        html: '<p><br></p>',
        config: editorConfig,
        mode: 'simple', // or 'simple'
    })

    const toolbarConfig = {}

    const toolbar = createToolbar({
        editor,
        selector: '#toolbar-container',
        config: toolbarConfig,
        mode: 'simple', // or 'simple'
    })


    $("#emp_add_modal_btn3").click(function () {
        const fromEditorInfo = editor.getHtml();
        const bigTitleInfo = document.getElementById("bigTitleInfo").value;

        $.ajax({
            url: "/FromEditorInfo",
            type: "post",
            data: {
                'htmlInfo': fromEditorInfo,
                'bigTitleInfo': bigTitleInfo
            },
            success: function (data) {

            },
            error: function (errormsg) {

            }
        });
    });


    $("#confirmTitleBtn").onmouseout(function () {
        $.ajax({
            url: "/FromBigTitleInfo",
            type: "post",
            data: {
                'bigTitleInfo': bigTitleInfo
            },
            success: function (data) {
                $('#bigTitleInfo').attr('disabled', true);
                $("#noteTitle").remove();
            },
            error: function (errormsg) {

            }
        });
    });

    //    鼠标按下打卡按钮
    function punchCard() {
        $("[data-toggle='popover']").popover();
        let punchCard = document.getElementById("punchCard");
        alert("打卡成功")
        punchCard.setAttribute("style", "color:#4ad3e2");

        $.ajax({
            url: "/savePunchCard",
            type: "post",
            data: {},
            success: function (data) {
                // $('#bigTitleInfo').attr('disabled', true);
                // $("#noteTitle").remove();
                window.location.reload();
            },
            error: function (errormsg) {

            }
        });

    }

    function toCreateNoteHtml() {
        window.open('http://118.31.60.43/toCreateNoteHtml', '_blank');
    }

    function getNoteInfo() {
        window.open('http://118.31.60.43/getNoteInfo', '_self');
    }
    // function getPunchInfo() {
    //     window.open('http://118.31.60.43/getPunchInfo', '_self');
    // }

    function flushPunch() {
        window.open('http://118.31.60.43/flushPageToFlushPunch', '_self');
    }

    function toWallet() {
        window.open('http://118.31.60.43/dispWalletRMB', '_self');

    }
    function tozhuanpan(){
        window.open('http://118.31.60.43/toZhuanpan', '_blank');
    }
</script>


</body>
</html>
